package com.zhida.smartcontrol.pagehome;

import com.zhida.smartcontrol.common.bean.LampBean;
import com.zhida.smartcontrol.common.bean.LampSwitchBean;
import com.zhida.smartcontrol.mvp.BasePresenter;
import com.zhida.smartcontrol.mvp.BaseView;
import com.zhida.smartcontrol.pagectrl.projectdetail.warning.WarningBean;

import java.util.List;

/**
 * author: tanjianpei
 * date: 2019/10/8 008 15:33
 * description:
 */
public class PageHomeContract {
    interface View extends BaseView {
        void showProjectId(String id);

        void showList(List<ProjectResultBean> resultBeans);

        void showPop(LampBean lampBean);

        void changeMode(int type, String switchType);

        void openCloseOk(boolean open, String switchType);

        void showWarningData(WarningBean warningBean);
    }

    interface Presenter extends BasePresenter<View> {
        // 获取项目列表
        void requestProjectList();

        // 根据项目 ID 和查询条件获取该项目下的所有设备
        void requestByProjectAndKeyWord(String projectBaseId);

        // 根据设备 ID 获取设备详情
        void requestLampData(String id);

        // 自动，手动切换
        void changeMode(List<String> codeList, int type, String switchType);

        // 开关灯
        void openClose(List<String> codeList, String type, String switchType);

        //双灯开关
        void openCloseNbDouble(List<String> codeList, String type, String value, String switchType);

        //时间校准
        void requestTime(String switchType, List<LampBean> codeList);

        //根据项目和类型获取故障信息列表数据
        void requestWarning(String projectBaseId);
    }
}
